gtk: fix many callback annotations to include closure information
authorEvan Nemerson <evan@nemerson.com>
Mon, 26 May 2014 16:24:00 +0000 (09:24 -0700)
committerEvan Nemerson <evan@nemerson.com>
Wed, 28 May 2014 04:10:32 +0000 (21:10 -0700)
Without this information introspection-based consumers don't realize
they can include context information, but instead think that they
receive an extra gpointer argument (which they don't know how to
handle).

https://bugzilla.gnome.org/show_bug.cgi?id=730745

gtk/deprecated/gtkstock.h
gtk/gtkcelllayout.c
gtk/gtkcelllayout.h
gtk/gtkclipboard.h
gtk/gtkiconview.h
gtk/gtkmain.c
gtk/gtkmain.h
gtk/gtktexttagtable.h
gtk/gtktreemodel.h
gtk/gtktreeviewcolumn.c
gtk/gtktreeviewcolumn.h

index 1ef97e73805058d74e38e75f2f2f119b464209ad..bdbed8c31148879ab887c64ee9c32a1cf0d723e6 100644 (file)
@@ -38,7 +38,8 @@ G_BEGIN_DECLS
  * GtkTranslateFunc:
  * @path: The id of the message. In #GtkActionGroup this will be a label
  *   or tooltip from a #GtkActionEntry.
- * @func_data: user data passed in when registering the function
+ * @func_data: (closure): user data passed in when registering the
+ *   function
  *
  * The function used to translate messages in e.g. #GtkIconFactory
  * and #GtkActionGroup.
index af9cee5be3657b9fd3fdc47367e2a4d69ef5e38d..16b9e854615052c0ddcd3deea0bfef7a1f3e4285 100644 (file)
@@ -500,7 +500,7 @@ gtk_cell_layout_add_attribute (GtkCellLayout   *cell_layout,
  * @cell_layout: a #GtkCellLayout
  * @cell: a #GtkCellRenderer
  * @func: (allow-none): the #GtkCellLayoutDataFunc to use, or %NULL
- * @func_data: user data for @func
+ * @func_data: (closure): user data for @func
  * @destroy: destroy notify for @func_data
  *
  * Sets the #GtkCellLayoutDataFunc to use for @cell_layout.
index 13cd9b23f9410831dd535e08a4ff395c5f583edf..3e3e33fe6907a624abbdd377d9545ca3f50467ac 100644 (file)
@@ -44,7 +44,7 @@ typedef struct _GtkCellLayoutIface      GtkCellLayoutIface;
  * @cell: the cell renderer whose value is to be set
  * @tree_model: the model
  * @iter: a #GtkTreeIter indicating the row to set the value for
- * @data: user data passed to gtk_cell_layout_set_cell_data_func()
+ * @data: (closure): user data passed to gtk_cell_layout_set_cell_data_func()
  *
  * A function which should set the value of @cell_layout’s cell renderer(s)
  * as appropriate. 
index 9fa8837a0c5c6646f1fff9d99617d5fe11acc52f..f7d27d73b0791016a1aecf223ccd764949b5a34e 100644 (file)
@@ -38,7 +38,8 @@ G_BEGIN_DECLS
  * @selection_data: a #GtkSelectionData containing the data was received.
  *   If retrieving the data failed, then then length field
  *   of @selection_data will be negative.
- * @data: the @user_data supplied to gtk_clipboard_request_contents().
+ * @data: (closure): the @user_data supplied to
+ *   gtk_clipboard_request_contents().
  *
  * A function to be called when the results of gtk_clipboard_request_contents()
  * are received, or when the request fails.
@@ -71,7 +72,8 @@ typedef void (* GtkClipboardRichTextReceivedFunc) (GtkClipboard     *clipboard,
  * GtkClipboardImageReceivedFunc:
  * @clipboard: the #GtkClipboard
  * @pixbuf: the received image
- * @data: the @user_data supplied to gtk_clipboard_request_image().
+ * @data: (closure): the @user_data supplied to
+ *   gtk_clipboard_request_image().
  *
  * A function to be called when the results of gtk_clipboard_request_image()
  * are received, or when the request fails.
@@ -92,7 +94,8 @@ typedef void (* GtkClipboardURIReceivedFunc)      (GtkClipboard     *clipboard,
  * @atoms: the supported targets, as array of #GdkAtom, or %NULL
  *   if retrieving the data failed.
  * @n_atoms: the length of the @atoms array.
- * @data: the @user_data supplied to gtk_clipboard_request_targets().
+ * @data: (closure): the @user_data supplied to
+ *   gtk_clipboard_request_targets().
  *
  * A function to be called when the results of gtk_clipboard_request_targets()
  * are received, or when the request fails.
index 4a2468ca3f485976eba6ecacdb9fca2494e06401..d52f2a936831542dfe52511b5cb991f0acffdd6e 100644 (file)
@@ -46,7 +46,7 @@ typedef struct _GtkIconViewPrivate    GtkIconViewPrivate;
  * GtkIconViewForeachFunc:
  * @icon_view: a #GtkIconView
  * @path: The #GtkTreePath of a selected row
- * @data: user data
+ * @data: (closure): user data
  *
  * A function used by gtk_icon_view_selected_foreach() to map all
  * selected rows.  It will be called on every selected row in the view.
index 16a071241bb2c7d2dc33988f7c9ddf6ed656b2dc..c1a6076de42170a064fe8510de3c626e59356b94 100644 (file)
@@ -2197,7 +2197,7 @@ gtk_device_grab_remove (GtkWidget *widget,
 /**
  * gtk_key_snooper_install: (skip)
  * @snooper: a #GtkKeySnoopFunc
- * @func_data: data to pass to @snooper
+ * @func_data: (closure): data to pass to @snooper
  *
  * Installs a key snooper function, which will get called on all
  * key events before delivering them normally.
index 11f2f7406d66aa1eda92ab9fd3e1bb6c56511aa0..8c3b17fcb43904dea2283d8bfebf9f8cf56d2023 100644 (file)
@@ -54,7 +54,7 @@ G_BEGIN_DECLS
  * GtkKeySnoopFunc:
  * @grab_widget: the widget to which the event will be delivered
  * @event: the key event
- * @func_data: data supplied to gtk_key_snooper_install()
+ * @func_data: (closure): data supplied to gtk_key_snooper_install()
  *
  * Key snooper functions are called before normal event delivery.
  * They can be used to implement custom key event handling.
index e853c40a429930ff318c09fb77b9fc7ae0f35d3e..333f83461604ebdba07c59938818a20f3c6b723a 100644 (file)
 
 G_BEGIN_DECLS
 
+/**
+ * GtkTextTagTableForeach:
+ * @tag: the #GtkTextTag
+ * @data: (closure): data passed to gtk_text_tag_table_foreach()
+ */
 typedef void (* GtkTextTagTableForeach) (GtkTextTag *tag, gpointer data);
 
 #define GTK_TYPE_TEXT_TAG_TABLE            (gtk_text_tag_table_get_type ())
index 9eef7c62ce8a60956817efe249f3f8f4759e4b9f..3edece26950bff7b25e7ed0138935cdaf2ece620 100644 (file)
@@ -47,7 +47,7 @@ typedef struct _GtkTreeModelIface   GtkTreeModelIface;
  * @model: the #GtkTreeModel being iterated
  * @path: the current #GtkTreePath
  * @iter: the current #GtkTreeIter
- * @data: The user data passed to gtk_tree_model_foreach()
+ * @data: (closure): The user data passed to gtk_tree_model_foreach()
  *
  * Type of the callback passed to gtk_tree_model_foreach() to
  * iterate over the rows in a tree model.
index c2439eadaea1517e53cffe4245a6b9d24cca454a..64429fa8452183ee947a77f0b278a7f7b1e77c32 100644 (file)
@@ -1823,7 +1823,7 @@ gtk_tree_view_column_set_attributes (GtkTreeViewColumn *tree_column,
  * @tree_column: A #GtkTreeViewColumn
  * @cell_renderer: A #GtkCellRenderer
  * @func: (allow-none): The #GtkTreeCellDataFunc to use. 
- * @func_data: The user data for @func.
+ * @func_data: (closure): The user data for @func.
  * @destroy: The destroy notification for @func_data
  * 
  * Sets the #GtkTreeCellDataFunc to use for the column.  This
index a991218e2bcf9b8d90e595f12723135d254dae3b..b91092eabdd345671cf7034c19883c4e7dfa675a 100644 (file)
@@ -65,7 +65,7 @@ typedef enum
  * @cell: The #GtkCellRenderer that is being rendered by @tree_column
  * @tree_model: The #GtkTreeModel being rendered
  * @iter: A #GtkTreeIter of the current row rendered
- * @data: user data
+ * @data: (closure): user data
  *
  * A function to set the properties of a cell instead of just using the
  * straight mapping between the cell and the model.  This is useful for